﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using SERP.Controllers;
using System.Collections.Generic;
using SERP.DAO;

public partial class Controls_NavBar : System.Web.UI.UserControl
{
    ModulesEntity oModule;
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request["Module"] != null)
        {
            oModule = ModulesController.FindModuleByCode(Request["Module"].Trim());
            if (oModule != null)
            {
                int parentId = Controller.ConvertInt(Request["pmid"]);
                MenusEntity o = MenusController.GetMenusById(parentId);
                if (o != null)
                {
                    lmSL.Text = o.MenuName;
                    List<MenusEntity> lsMenu = MenusController.GetMenusByParentModule(parentId, oModule.ModuleId);
                    this.rptMenu.DataSource = lsMenu;
                    this.rptMenu.DataBind();
                }
            }
        }
    }


}
